package demo1;
//方法一
//public class Test {
//    public static void main(String[] args) {
//    Computer computer = new Computer();
//        IUSB usb = new KeyBoard();
//        IUSB usb2 = new Mouse();
//        computer.useDevice(usb);
//        computer.useDevice(usb2);
//    }
//
//}


//方法二
//public class Test{
//    public static void main(String[] args) {
//        Computer computer = new Computer();
//        KeyBoard keyBoard = new KeyBoard();
//        Mouse mouse = new Mouse();
//        computer.useDevice(keyBoard);
//        computer.useDevice(mouse);
//    }
//}




















